
public class ItoSPE extends EnvTreeNode implements PEObject{

	public ItoSPE() {
		super("<PE:ItoS>");
	}

	public String apply(String param1, String param2){
		if ( param1.length() > 5 &&
				param1.substring(0,5).equals("<INT:") ){
			return "<STR:'"+getInt(param1)+"'>";
		}else{
			return "expected a int";
		}
	}
	
	private int getInt(String op) {
		String intPart = op.split(":")[1];
		intPart = intPart.substring(0, intPart.length()-1);
		int result = Integer.parseInt(intPart);
		return result;
	}
}
